package com.ruanyun.modular.admin.service;

import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.ruanyun.base.pojo.page.LayuiPageInfo;
import com.ruanyun.modular.admin.entity.TCommitReport;
import com.ruanyun.modular.admin.model.params.TCommitReportParam;
import com.ruanyun.modular.admin.model.result.TCommitReportResult;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 报告提交表 服务类
 * </p>
 *
 * @author zs
 * @since 2021-04-28
 */
public interface TCommitReportService extends IService<TCommitReport> {

    /**
     * 新增
     *
     * @author zs
     * @Date 2021-04-28
     */
    ResponseData add(TCommitReportParam param);

    /**
     * 删除
     *
     * @author zs
     * @Date 2021-04-28
     */
    void delete(TCommitReportParam param);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    ResponseData updateDelFlagById(Long id);

    /**
     * 更新
     *
     * @author zs
     * @Date 2021-04-28
     */
    ResponseData update(TCommitReportParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zs
     * @Date 2021-04-28
     */
    TCommitReportResult findBySpec(TCommitReportParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author zs
     * @Date 2021-04-28
     */
    List<TCommitReportResult> findListBySpec(TCommitReportParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zs
     * @Date 2021-04-28
     */
    LayuiPageInfo findPageBySpec(TCommitReportParam param);

    /**
     * 启用
     *
     * @param id
     * @return
     */
    ResponseData enableById(Long id);

    /**
     * 禁用
     *
     * @param id
     * @return
     */
    ResponseData disableById(Long id);

    ResponseData commitReport(Integer companyId);

    ResponseData returnReport(Integer id);

    TCommitReport getDetailByCid(Integer companyId);


    /*获取导出数据*/
    Map<String, Object> dataMap(Integer companyId);

    /**
     * 导出数据
     *
     * @param companyId
     * @param request
     * @param response
     * @return
     */
    ResponseData exportData(Integer companyId, HttpServletRequest request, HttpServletResponse response);
}
